docs(agents): restructure AGENTS.md with progressive disclosure and skills.sh integration#298
Conversation
…kills.sh integration - Rewrite AGENTS.md to be concise (~90 lines, down from 196) following HumanLayer best practices: WHAT/WHY/HOW structure, universally-applicable instructions only, progressive disclosure index - Add codebase map, tech stack summary, and verification commands table - Create agent_docs/ directory with domain-specific guides: - architecture.md: crate relationships, data flow, key abstractions - common-pitfalls.md: known agent mistakes (WS state, perf baselines, etc.) - e2e-testing.md: E2E setup and headless-browser pitfalls (moved from AGENTS.md) - render-performance.md: profiling infrastructure docs (moved from AGENTS.md) - adding-plugins.md: plugin addition checklist (moved from AGENTS.md) - ui-development.md: React/Zustand/Jotai patterns, state management rules - skills-setup.md: skills.sh integration with recommended packages Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…, crate deps, and stale path - Fix Zustand/Jotai state management descriptions in architecture.md, common-pitfalls.md, and ui-development.md to reflect the actual code: Jotai atoms are the primary store for high-frequency per-node data, Zustand handles pipeline structure with transitional compat writes - Fix just knip -> just knip-ui in AGENTS.md verification table - Add install-e2e and install-playwright prerequisites to e2e-testing.md - Fix crate dependency diagram direction in architecture.md (arrows now point from dependent to dependency) - Replace stale marketplace/PORTABILITY_REVIEW.md reference with verify_bundles.py in adding-plugins.md - Fix React Query scope: drop 'marketplace' (uses useState/useEffect) Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
…opment.md Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
…mpatibility Per Anthropic docs (https://code.claude.com/docs/en/memory#agents-md), Claude Code reads CLAUDE.md not AGENTS.md. This file imports AGENTS.md so both Claude Code and other agents read the same instructions without duplication. Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
…it-cli to maps - Create .claude/skills/ with thin SKILL.md wrappers (frontmatter only) that symlink guide.md -> agent_docs/<name>.md. This gives Claude Code progressive disclosure (name+description at startup, full content on-demand) with zero content duplication. - Add apps/skit-cli/ (streamkit-client) to codebase maps in AGENTS.md and agent_docs/architecture.md. Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
| --- | ||
| name: adding-plugins | ||
| description: Checklist for making a StreamKit plugin official and downloadable from the registry. Use when adding a new native plugin or updating an existing one for marketplace distribution. | ||
| --- | ||
|
|
||
| For the full plugin addition checklist, see [guide.md](guide.md). |
There was a problem hiding this comment.
🚩 YAML frontmatter compatibility with SPDX headers
The .claude/skills/*/SKILL.md files use YAML frontmatter (--- delimiters) as their first content. When adding the SPDX HTML comment header before the frontmatter, some strict markdown/YAML parsers may not recognize the frontmatter if it's not at byte 0 of the file. However, Claude Code's SKILL.md parser (and most modern tools like GitHub, Hugo, Jekyll) handle HTML comments before frontmatter without issue. If a compatibility issue arises with skills.sh tooling, the SPDX header could alternatively be placed inside the frontmatter block as a YAML comment, though the HTML comment approach is consistent with every other .md file in this repo.
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
…d files Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
- skills-setup.md: distinguish repo-maintained .claude/skills/ (committed, symlinked to agent_docs/) from user-local skill installs. Warn against running npx skills add into the tracked tree. - AGENTS.md: replace inaccurate cargo clippy --workspace command with just lint-skit, which matches the actual lint contract (per-crate feature flags, --all-targets, license check). Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
AGENTS.md
Outdated
| | `sdks/plugin-sdk/` | Plugin SDKs for Rust, Go, and C | | ||
| | `ui/` | React 19 web UI (Vite + Bun) | | ||
| | `plugins/native/` | Official ML plugins (Whisper, Kokoro, NLLB, etc.) | | ||
| | `samples/pipelines/` | Example YAML pipelines (`dynamic/` and `oneshot/`) | |
There was a problem hiding this comment.
There's more under samples/ worth documenting as it serves all of our assets (e.g. audio files, images, fonts, slint files, and likely more in the future).
There was a problem hiding this comment.
Good point — updated to samples/ (not samples/pipelines/) and expanded the description to include audio files, images, fonts, and Slint files. Fixed in 9a2db12.
| | `ui/` | React 19 web UI (Vite + Bun) | | ||
| | `plugins/native/` | Official ML plugins (Whisper, Kokoro, NLLB, etc.) | | ||
| | `samples/pipelines/` | Example YAML pipelines (`dynamic/` and `oneshot/`) | | ||
| | `e2e/` | Playwright end-to-end tests | |
There was a problem hiding this comment.
worth mentioning we have another level of non-UI e2e tests, under tests/, which are essentially oneshot pipeline validations atm.
There was a problem hiding this comment.
I looked for a top-level tests/ directory but it doesn't exist yet on main (only e2e/tests/). Could you clarify where these oneshot pipeline validation tests live? Happy to add the entry once I know the path — or if this is something planned, I can add it when it lands.
There was a problem hiding this comment.
PR is not up to date with main, you should merge.
There was a problem hiding this comment.
Merged main into the branch. However, tests/ still doesn't exist at the repo root after the merge — only e2e/tests/. Is it on a different branch, or something planned? Happy to add the codebase map entry once it lands.
There was a problem hiding this comment.
Apologies, these are getting introduced in #279, but still makes sense to assume they are in so we don't forget later as we'll merge both soon.
There was a problem hiding this comment.
Thanks for clarifying — added tests/ to both codebase maps (AGENTS.md and architecture.md) as "Pipeline validation tests (oneshot pipeline smoke tests)". Fixed in 58087fd.
AGENTS.md
Outdated
|
|
||
| ## Tech Stack | ||
|
|
||
| - **Rust 1.92** (pinned in `rust-toolchain.toml`), tokio, axum, wgpu |
There was a problem hiding this comment.
How do we keep this maintainable? For example, we might upgrade to v1.94 tomorrow.
There was a problem hiding this comment.
Fair concern — removed the hardcoded version. Now reads **Rust** (version pinned in \rust-toolchain.toml`)` so it stays accurate across upgrades. Fixed in 9a2db12.
AGENTS.md
Outdated
|
|
||
| - Official images: `Dockerfile` (CPU) and `Dockerfile.gpu` (GPU) via `.github/workflows/docker.yml`. | ||
| - Health endpoint: `/healthz` (also `/health`). | ||
| - Images do not bundle ML models or plugins — mount them at runtime. |
There was a problem hiding this comment.
nit: we do have full versions that do.
There was a problem hiding this comment.
Updated to distinguish slim vs full images: "Slim images do not bundle ML models or plugins — mount them at runtime. Full images (with -full tag) include bundled models and plugins." Fixed in 9a2db12.
| - **Human review required** before bundling any new third-party shared libraries | ||
| (licensing, security, size, and distro compatibility). |
There was a problem hiding this comment.
Also, if a plugin relies on models, we want to upload them to our streamkit Huggingface repo so they're accessible indefinitely, license permitting. But if the license is that restrictive, we probably shouldn't build a plugin with it anyway.
There was a problem hiding this comment.
Good addition — added a bullet point: "Models: if the plugin relies on ML models, upload them to the StreamKit Hugging Face repo so they remain accessible indefinitely (license permitting)." Fixed in 9a2db12.
…r, and models - samples/ row: mention assets (audio, images, fonts, Slint files) not just pipelines - Rust version: reference rust-toolchain.toml instead of hardcoding 1.92 - Docker: note that slim images don't bundle models but full images do - adding-plugins.md: add step to upload models to HuggingFace repo Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
| - **Human review required** before bundling any new third-party shared libraries | ||
| (licensing, security, size, and distro compatibility). | ||
| | All lints | `just lint` | | ||
| | Rust lint only | `just lint-skit` (fmt + clippy with per-crate feature flags + license check) | |
There was a problem hiding this comment.
🟡 AGENTS.md incorrectly claims just lint-skit includes a license check
The Verification Commands table states just lint-skit performs "fmt + clippy with per-crate feature flags + license check", but the actual lint-skit recipe in the justfile only runs cargo fmt and cargo clippy. The license check is performed by the separate check-license-headers recipe, which is invoked by just lint but not by just lint-skit. An agent that runs only just lint-skit (believing it covers license compliance) would miss the SPDX/REUSE check entirely.
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
There was a problem hiding this comment.
This finding is incorrect — lint-skit does include a license check. Line 235 of the justfile runs cargo deny check licenses as part of the lint-skit recipe. The description "fmt + clippy with per-crate feature flags + license check" is accurate.
Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
| - Standard images do not bundle ML models or plugins — mount them at runtime. | ||
| Demo images (`Dockerfile.demo`, tagged `-demo`) include bundled models and plugins. |
There was a problem hiding this comment.
🚩 Legacy Dockerfile.full and Dockerfile.full-gpu still exist alongside new Dockerfile.demo
The Docker section now references only Dockerfile.demo (tagged -demo), which matches the current .github/workflows/docker.yml. However, the repo still contains Dockerfile.full and Dockerfile.full-gpu files. These appear to be legacy files not referenced by any workflow. While the new documentation is accurate about the active Docker setup, the presence of these stale Dockerfiles could confuse contributors who browse the repo root. Consider removing them or adding a note.
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
There was a problem hiding this comment.
Acknowledged — the documentation now accurately describes the active Docker workflow (Dockerfile, Dockerfile.gpu, Dockerfile.demo). The stale Dockerfile.full / Dockerfile.full-gpu files are a pre-existing cleanup item outside the scope of this docs PR. @streamer45 — want me to file a separate issue to track removing those?
There was a problem hiding this comment.
streamkit:full-gpu is actually used as base for our private demo deployment so I'd leave as is.
There was a problem hiding this comment.
Got it — Dockerfile.full-gpu is in active use for the private demo deployment. No cleanup needed then. The docs are accurate as-is for the public workflow.
Signed-off-by: StreamKit Devin <devin@streamkit.dev> Co-Authored-By: Claudio Costa <cstcld91@gmail.com>
| | `ui/` | React 19 web UI (Vite + Bun) | | ||
| | `plugins/native/` | Official ML plugins (Whisper, Kokoro, NLLB, etc.) | | ||
| | `samples/` | Example pipelines (`dynamic/` and `oneshot/`), audio files, images, fonts, Slint files | | ||
| | `tests/` | Pipeline validation tests (oneshot pipeline smoke tests) | |
There was a problem hiding this comment.
🚩 Codebase map references tests/ directory that doesn't exist yet
Both AGENTS.md:36 and agent_docs/architecture.md:37 document a tests/ directory for "Pipeline validation tests (oneshot pipeline smoke tests)". This directory does not exist on origin/main or in the current working tree. It was introduced in commit 70347b9 (PR #285: "feat(e2e): add headless pipeline validation tests") which is not yet merged into main. If this PR merges before #285, the documentation will reference a non-existent directory. Not flagged as a bug because it's common for doc PRs to anticipate parallel changes, and the impact is limited to documentation accuracy.
Was this helpful? React with 👍 or 👎 to provide feedback.
Debug
There was a problem hiding this comment.
Intentional — the maintainer explicitly requested adding tests/ to anticipate the parallel PR landing soon.
Summary
Improves coding agent performance by restructuring
AGENTS.mdfollowing HumanLayer best practices and adding skills.sh integration.Key changes:
Rewrote
AGENTS.mdfrom 196 → 91 lines. Now contains only universally-applicable instructions: project purpose (WHAT/WHY), codebase map, tech stack, workflow rules, verification commands table, and a progressive disclosure index pointing to detailed guides.Created
agent_docs/directory with 7 domain-specific guides that agents read only when relevant to their task:architecture.md— Crate relationships, data flow, key abstractions, UI architecturecommon-pitfalls.md— Known agent mistakes (WS vs REST state, perf baselines, Bun-only, SPDX, lint suppressions, React.memo barriers)e2e-testing.md— E2E setup + headless-browser pitfalls (moved from AGENTS.md)render-performance.md— Full profiling infrastructure docs (moved from AGENTS.md)adding-plugins.md— Plugin addition checklist (moved from AGENTS.md)ui-development.md— React/Zustand/Jotai patterns, state management rules, key directoriesskills-setup.md— skills.sh integration with recommended packagesAdded
CLAUDE.md— importsAGENTS.mdvia@AGENTS.mdsyntax per Anthropic docs.Added
.claude/skills/— 7 skills following the Agent Skills open standard. Each skill has a thinSKILL.md(frontmatter + description only) with aguide.mdsymlink to the correspondingagent_docs/file. Zero content duplication —agent_docs/is the single source of truth.Added skills.sh integration — documents recommended
npx skills addcommands for React (vercel-labs/agent-skills) and Playwright (anthropics/skills), with clear distinction between repo-maintained skills in.claude/skills/and user-local installs (~/.claude/skills/).Fixes applied during review:
just knip→just knip-uiinstall-e2e,install-playwright) addedmarketplace/PORTABILITY_REVIEW.mdreference replaced withverify_bundles.pyapps/skit-cli/added to codebase mapsjust lint-skit(matches actual per-crate feature flags).claude/skills/vs user-local installsReview & Testing Checklist for Human
agent_docs/architecture.mdaccuracy — crate relationships, data flow, UI state management (Jotai primary, Zustand transitional).claude/skills/symlinks resolve correctly (guide.md→../../agent_docs/<name>.md)agent_docs/common-pitfalls.mdfor completeness — any other common agent mistakes worth documenting?Test plan: Have an agent attempt a task (e.g., a UI change or a new node) using the updated docs and compare quality/speed vs previous sessions.
Notes
.agents/skills/are preserved..claude/skills/avoids content duplication while giving Claude Code native skill discovery..mdfiles; Claude Code's parser handles this fine).Link to Devin session: https://staging.itsdev.in/sessions/a35965cc944145dcad3d95a4bb194dd3
Requested by: @streamer45